﻿import { pickUpWhiteList } from './Routes/pickUpWhiteList';

export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          {
            name: '登录',
            path: '/user/login',
            component: './user/Login',
          },
          {
            name: '找回密码',
            path: '/user/pwd',
            component: './user/ForgetPwd',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/index',
    name: '概览',
    icon: 'home',
    access: 'canStation',
    component: './Index',
  },
  {
    path: '/order/delivery/',
    name: '订单管理',
    icon: 'appstore',
    access: 'canStation',
    routes: [
      {
        path: '/order/delivery/list',
        name: '派件业务',
        access: 'canStation',
        component: './OrderManage/DeliveryList/index',
      },
      {
        path: '/order/delivery/list/detail',
        component: './OrderManage/DeliveryList/Detail',
        name: '派件详情',
        hideInMenu: true,
        hideInBreadcrumb: true,
      },
      {
        path: '/order/delivery/history',
        component: './OrderManage/HistoryList',
        name: '查看历史订单',
        hideInMenu: true,
        // hideInBreadcrumb: true,
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/BasicConfig',
    name: '基础配置',
    icon: 'setting',
    access: 'canStation',
    hideInBreadcrumb: true,
    routes: [
      {
        path: '/BasicConfig/Cabinet',
        name: '柜体管理',
        access: 'canStation',
        component: './BasicConfig/Cabinet',
      },
      {
        path: '/BasicConfig/Download',
        name: '报表下载',
        access: 'canStation',
        component: './BasicConfig/Download',
      },
      {
        path: '/BasicConfig/Cabinet/detail',
        name: '柜体详情',
        hideInMenu: true,
        component: './BasicConfig/Cabinet/Detail',
      },
      {
        path: '/BasicConfig/Cabinet/cellDetail',
        name: '查看格口',
        hideInMenu: true,
        component: './BasicConfig/Cabinet/CellDetail',
      },
      {
        path: '/BasicConfig/Cabinet/cellType',
        name: '格口类型设置',
        hideInMenu: true,
        component: './BasicConfig/Cabinet/CellType',
      },
      {
        path: '/BasicConfig/Cabinet/cellTrack',
        name: '格口轨迹',
        hideInMenu: true,
        component: './BasicConfig/Cabinet/CellTrack',
      },
      {
        path: '/BasicConfig/Cabinet/cellHistoryOrder',
        name: '历史订单',
        hideInMenu: true,
        component: './BasicConfig/Cabinet/CellHistoryOrder',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/BusinessConfig',
    name: '业务配置',
    icon: 'container',
    access: '',
    routes: [...pickUpWhiteList],
  },
  {
    path: '/',
    redirect: '/Index',
  },
  {
    component: './404',
  },
];
